package entity;

public class GameObject {
//class for providing basic game object qualities
	
private String name;//the name of the object
public boolean isStatic;//if the object is static or dynamic
public boolean isGrounded;//if the object is on the ground;
private boolean terrainCollisions;//if the object collides with static objects
private boolean entityCollisions;//if the object collides with non static objects
private float[] pos = new float[3]; //x, y, z position
private float[] next_pos = new float[3]; //x, y, z position
private float[] rot = new float[3]; //x, y, z rotation vector
private float[] force = new float[3]; //x,y,z force component vector
private float[] vel = new float[3]; // x,y,z velocity component vector

private float height; //height in meters
private float radius; //radius of shape in meters
private float mass;   //mass in kg
private float MOA;    //moment of inertia
private float friction; //friction of current surface.  expressed as a percentage reduction in velocity
// Gameobject constructor - object needs a name, height and radius in meters, and mass in kg. 
public GameObject(String name, float height, float radius, float mass){
	this.name = name;
	isStatic = true;
	isGrounded = true;
	terrainCollisions = false;
	entityCollisions = false;
	this.pos[0] = 0;
	this.pos[1] = 0;
	this.pos[2] = 0;
	this.next_pos[0] = 0;
	this.next_pos[1] = 0;
	this.next_pos[2] = 0;
	this.rot[0] = 0;
	this.rot[1] = 0;
	this.rot[2] = 0;
	this.force[0] = 0;
	this.force[1] = 0;
	this.force[2] = 0;
	this.height = height;
	this.radius = radius;
	this.mass = mass;
	this.vel[0] = 0;
	this.vel[1] = 0;
	this.vel[2] = 0;
	this.friction = .9f;
}
/**
 * @return the radius
 */
public float getRadius(){
	return radius;
}
/**
 * @param height the height to set
 */
public void setRadius(int radius){
	this.radius = radius;
}
/**
 * @return the height
 */
public float getHeight(){
	return height;
}
/**
 * @param height the height to set
 */
public void setHeight(int height){
	this.height = height;
}
/**
 * @return the rot
 */
public float[] getRot() {
	return rot;
}
/**
 * @param rot the rot to set
 */
public void setRot(float[] rot) {
	this.rot = rot;
}
/**
 * @return the pos
 */
public float[] getPos() {
	return pos;
}
/**
 * @param pos the pos to set
 */
public void setPos(float[] pos) {
	this.pos = pos;
}
public void setPos(float x, float y, float z) {
	this.pos[0] = x;
	this.pos[1] = y;
	this.pos[2] = z;
}

/**
 * @return the nextpos
 */
public float[] getNextPos() {
	return next_pos;
}
/**
 * @param pos the pos to set
 */
public void setNextPos(float[] nextpos) {
	this.next_pos = nextpos;
}
/**
 * @return the name
 */
public String getName() {
	return name;
}
/**
 * @param name the name to set
 */
public void setName(String name) {
	this.name = name;
}
public float getPosX()
{
	return pos[0];
}

public float getPosY()
{
	return pos[1];
}
public float getPosZ()
{
	return pos[2];
}

public void setPosX(float x)
{
	pos[0]=x;
}

public void setPosY(float y)
{
	pos[1]=y;
}

public void setPosZ(float z)
{
	pos[2]=z;
}

public void setRotX(float x)
{
	rot[0]=x;
}

public void setRotY(float y)
{
	rot[1]=y;
}

public void setRotZ(float z)
{
	rot[2]=z;
}

public float getRotX()
{
	return rot[0];
}

public float getRotY()
{
	return rot[1];
}

public float getRotZ()
{
	return rot[2];
}

public float getForceX()
{
	return force[0];
}

public float getForceY()
{
	return force[1];
}
public float getForceZ()
{
	return force[2];
}
public void setForceX(float x)
{
	force[0] = x;
}

public void setForceY(float y)
{
	force[1] = y;
}
public void setForceZ(float z)
{
	force[2] = z;
}
public void setForces(float x, float y, float z){
	force[0] = x;
	force[1] = y;
	force[2] = z;
}
public float getFriction()
{
	return friction;
}

public float getMass(){
	return mass;
}

public void setVelX(float x)
{
	vel[0]=x;
}

public void setVelY(float y)
{
	vel[1]=y;
}

public void setVelZ(float z)
{
	vel[2]=z;
}

public void setVel(float x, float y, float z){
	vel[0] = x;
	vel[1] = y;
	vel[2] = z;
}

public float getNextX()
{
	return next_pos[0];
}

public float getNextY()
{
	return next_pos[1];
}

public float getNextZ()
{
	return next_pos[2];
}

public void setNextX(float x)
{
	next_pos[0]=x;
}

public void setNextY(float y)
{
	next_pos[1]=y;
}

public void setNextZ(float z)
{
	next_pos[2]=z;
}

public void setNextPos(float x, float y, float z){
	next_pos[0] = x;
	next_pos[1] = y;
	next_pos[2] = z;
}
public float getVelX()
{
	return vel[0];
}

public float getVelY()
{
	return vel[1];
}

public float getVelZ()
{
	return vel[2];
}


}